//
//  loadImage.m
//  qulvyou
//
//  Created by mmyy on 15/10/21.
//  Copyright (c) 2015年 mmyy. All rights reserved.
//

#import "loadImage.h"

@implementation loadImage


+(UIImageView *)loadImage
{
    UIImageView *_bgImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
    _bgImage.backgroundColor = [UIColor blackColor];
    _bgImage.alpha = 0.6;
    UIActivityIndicatorView *activ = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    activ.frame = CGRectMake(10, 0,  80, 80);
    activ.backgroundColor = [UIColor clearColor];
    activ.color = [UIColor whiteColor];
    activ.transform = CGAffineTransformMakeScale(2, 2);
    [_bgImage addSubview:activ];
    [activ startAnimating];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 80, 80, 20)];
    label.textColor = [UIColor whiteColor];
    label.text = @"加载中...";
    label.textAlignment = NSTextAlignmentCenter;
    label.adjustsFontSizeToFitWidth = YES;
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont systemFontOfSize:15];
    [_bgImage addSubview:label];
    return _bgImage;
    
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
